package com.lmc.health;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import com.lmc.R;
import com.qxzn.app.page.BaseActivity;

/**
 * 健康数据解读
 */
public class HealthDataInfoActivit extends BaseActivity {


    private TextView title;
    private TextView value;
    private TextView select_dataValue;
    private TextView diseasestate_describe;

    @Override
    protected int initLayout() {
        return R.layout.activity_health_data_info;
    }

    @Override
    protected void initView() {

        title = (TextView) findViewById(R.id.title);
        value = (TextView) findViewById(R.id.value);
        select_dataValue = findViewById(R.id.select_dataValue);
        diseasestate_describe = findViewById(R.id.diseasestate_describe);
    }

    @Override
    protected void iniTitleBar() {
        tv_title.setText("数据解读");
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        initView();
        title.setText(getIntent().getStringExtra("title"));
        value.setText(getIntent().getStringExtra("value") + "\n"+getIntent().getStringExtra("unit"));
        select_dataValue.setText(getIntent().getStringExtra("select_dataValue"));
        diseasestate_describe.setText(getIntent().getStringExtra("diseasestate_describe"));
    }


    public static void start(Context context, String value, String unit, String select_dataValue, String title,String diseasestate_describe) {
        Intent intent = new Intent(context, HealthDataInfoActivit.class);
        intent.putExtra("value", value);
        intent.putExtra("unit", unit);
        intent.putExtra("title", title);
        intent.putExtra("diseasestate_describe",diseasestate_describe);
        Log.e("----------","diseasestate_describe:"+diseasestate_describe);
        intent.putExtra("select_dataValue",select_dataValue);
        context.startActivity(intent);
    }
}
